﻿using UnityEngine;

namespace ProjectDanmaku.Broadcast
{
    public class BroadcastTransmit : MonoBehaviour
    {
        [SerializeField] private string channel;
        [SerializeField] private Object data;
        
        public void Transmit()
        {
            BroadcastServer.Instance.Broadcast(new BroadcastChannel(channel), data);
        }
        
        public void TransmitChannel(string channel)
        {
            BroadcastServer.Instance.Broadcast(new BroadcastChannel(channel), data);
        }
    }
}